cmake_minimum_required(VERSION 3.22)

project(pointcloud_to_grid)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")

find_package(ament_cmake_auto REQUIRED)
find_package(rclcpp REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(nav_msgs REQUIRED)
find_package(pcl_ros REQUIRED)
find_package(pcl_conversions REQUIRED)

ament_auto_find_build_dependencies()

ament_auto_add_library(pointcloud_to_grid
        src/pointcloud_to_grid.cpp
)

ament_auto_add_executable(Huiggtest
  src/test.cpp
)

ament_auto_add_executable(pointcloud_to_grid_node
  src/pointcloud_to_grid_node.cpp
)

ament_auto_package()